package com.zhuss.bean.vo.food.order.wechat;

import java.util.ArrayList;
import java.util.List;

import com.zhuss.common.AbstractVo;
import com.zhuss.common.ActionVo;
import com.zhuss.enums.Area;
import com.zhuss.enums.DiningType;
import com.zhuss.enums.OrderAction;
import com.zhuss.enums.OrderStatus;
import com.zhuss.enums.ProductType;

public class OrderVo extends AbstractVo {
    private Long orderId;

    private String orderNo;

    private Integer type;

    private Long count; // 总份数

    private Long productCount; // 商品种类数

    private Long amount; // 订单总价

    private Integer status; // 状态

    private Integer area; // 分区

    private String typeName; // 订单种类名称  ：   外卖打包   点炒服务
    
    private String statusName; // 状态名称
    
    private Long createTime; // 下单时间
    
    private Long maxFetchFoodTime; // 最晚取餐时间
    
    private List<OrderProductVo> orderProductList; // 订单的商品列表明细
    
    private List<ActionVo> actionList;
    
    private Integer diningType;
    
    private String diningTypeName;
    
    private String serviceCompanyphone;
    
    private Long expectFetchTimeStart;

    private Long expectFetchTimeEnd; 
    
    private List<TopicBean> topicList;
    
    private Long date;
	
	private Integer foodTime;

	private Integer personNum;

	private Integer havingStandard;

	private Integer drinkType;
	
	private String foodTimeName;
	
	private String havingStandardName;
	
	private String drinkTypeName;

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public String getOrderNo() {
		orderNo = subNo(orderNo);
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	public Long getProductCount() {
		return productCount;
	}

	public void setProductCount(Long productCount) {
		this.productCount = productCount;
	}

	public Long getAmount() {
		return amount;
	}

	public void setAmount(Long amount) {
		this.amount = amount;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getArea() {
		return area;
	}

	public void setArea(Integer area) {
		this.area = area;
	}

	public String getTypeName() {
		typeName = productTypeName(this.type);
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getStatusName() {
		statusName = statusNameOrder(this.status);
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public List<OrderProductVo> getOrderProductList() {
		return orderProductList;
	}

	public void setOrderProductList(List<OrderProductVo> orderProductList) {
		this.orderProductList = orderProductList;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public Long getMaxFetchFoodTime() {
		return maxFetchFoodTime;
	}

	public void setMaxFetchFoodTime(Long maxFetchFoodTime) {
		this.maxFetchFoodTime = maxFetchFoodTime;
	}

	public List<ActionVo> getActionList() {
		actionList = new ArrayList<ActionVo>();
		if (
				(OrderStatus.未取餐.sameKey(this.status) || OrderStatus.未接单.sameKey(this.status))
				
				&& !ProductType.公务接待.sameKey(this.type)
				&& !Area.中区.sameKey(this.area)
			) {
			ActionVo av = new ActionVo();
			av.setLabel(OrderAction.取消订单.name());
			av.setType(OrderAction.取消订单.tag());
			actionList.add(av);
		} else if (
				(OrderStatus.未接单.sameKey(this.status))
				&& Area.中区.sameKey(this.area)
			) {
			ActionVo av = new ActionVo();
			av.setLabel(OrderAction.取消订单.name());
			av.setType(OrderAction.取消订单.tag());
			actionList.add(av);
		} else if (OrderStatus.已取餐.sameKey(this.status)) {
			ActionVo av = new ActionVo();
			av.setLabel(OrderAction.评价.name());
			av.setType(OrderAction.评价.tag());
			actionList.add(av);
		}
		return actionList;
	}

	public void setActionList(List<ActionVo> actionList) {
		this.actionList = actionList;
	}

	public Integer getDiningType() {
		return diningType;
	}

	public void setDiningType(Integer diningType) {
		this.diningType = diningType;
	}

	public String getDiningTypeName() {
		diningTypeName = diningTypeName(this.diningType);
		diningTypeName = diningTypeName == null ? DiningType.外带.value() : diningTypeName;
		return diningTypeName;
	}

	public void setDiningTypeName(String diningTypeName) {
		this.diningTypeName = diningTypeName;
	}

	public String getServiceCompanyphone() {
		return serviceCompanyphone;
	}

	public void setServiceCompanyphone(String serviceCompanyphone) {
		this.serviceCompanyphone = serviceCompanyphone;
	}

	public Long getExpectFetchTimeStart() {
		return expectFetchTimeStart;
	}

	public void setExpectFetchTimeStart(Long expectFetchTimeStart) {
		this.expectFetchTimeStart = expectFetchTimeStart;
	}

	public Long getExpectFetchTimeEnd() {
		return expectFetchTimeEnd;
	}

	public void setExpectFetchTimeEnd(Long expectFetchTimeEnd) {
		this.expectFetchTimeEnd = expectFetchTimeEnd;
	}

	public List<TopicBean> getTopicList() {
		return topicList;
	}

	public void setTopicList(List<TopicBean> topicList) {
		this.topicList = topicList;
	}

	public Long getDate() {
		return date;
	}

	public void setDate(Long date) {
		this.date = date;
	}

	public Integer getFoodTime() {
		return foodTime;
	}

	public void setFoodTime(Integer foodTime) {
		this.foodTime = foodTime;
	}

	public Integer getPersonNum() {
		return personNum;
	}

	public void setPersonNum(Integer personNum) {
		this.personNum = personNum;
	}

	public Integer getHavingStandard() {
		return havingStandard;
	}

	public void setHavingStandard(Integer havingStandard) {
		this.havingStandard = havingStandard;
	}

	public Integer getDrinkType() {
		return drinkType;
	}

	public void setDrinkType(Integer drinkType) {
		this.drinkType = drinkType;
	}

	public String getFoodTimeName() {
		foodTimeName = foodTimeName(this.foodTime);
		return foodTimeName;
	}

	public void setFoodTimeName(String foodTimeName) {
		this.foodTimeName = foodTimeName;
	}

	public String getHavingStandardName() {
		havingStandardName = havingStandardName(this.havingStandard);
		return havingStandardName;
	}

	public void setHavingStandardName(String havingStandardName) {
		this.havingStandardName = havingStandardName;
	}

	public String getDrinkTypeName() {
		drinkTypeName = drinkTypeName(this.drinkType);
		return drinkTypeName;
	}

	public void setDrinkTypeName(String drinkTypeName) {
		this.drinkTypeName = drinkTypeName;
	}
    
}